<template>
    <h2>登录页面</h2>
    <table class="table table-bordered">
        <tbody>
            <tr class="bg-primary">
                <td>序号</td>
                <td>性名</td>
                <td>联系电话</td>
                <td>账号</td>
                <td>密码</td>
                <td>所属角色</td>
                <td>创建人</td>
            </tr>
            <tr v-for="item in LoginShow">
                <td>{{ item.id }}</td>
                <td>{{ item.name }}</td>
                <td>{{ item.phone.substring(0, 3) + "****" + item.phone.substring(7) }}</td>
                <td>{{ item.username }}</td>
                <td>***</td>
                <td>{{ item.juse }}</td>
                <td>{{ item.createName }}</td>
            </tr>
        </tbody>
    </table>
</template>

<script setup lang="ts">
//引入组件
import { ref, reactive, onMounted } from "vue"
//bootstrap样式
import "bootstrap/dist/css/bootstrap.min.css"
import axios from "axios"
import { useRouter } from "vue-router";

const router = useRouter();
const LoginShow = ref([])
const GetLoginShow = () => {


    axios.get("http://localhost:5028/api/LoginShow").then(res => {
        LoginShow.value = res.data;
    })
}
//钩子函数
onMounted(() => {
    GetLoginShow();
})
</script>